home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / User Contributions / zebu v3.3.3 (LALR parser) / zebu-actions.lisp < prev    next >
Encoding:
Text File  |  1994-09-12  |  2.1 KB  |  66 lines  |  [TEXT/ttxt]

  1. ; -*- mode:     CL -*- ----------------------------------------------------- ;
  2. ; File:         zebu-actions.l
  3. ; Description:  Functions used in ZEBU grammar actions
  4. ; Author:       Joachim H. Laubsch
  5. ; Created:      11-Jul-91
  6. ; Modified:     Wed May 20 16:20:57 1992 (Joachim H. Laubsch)
  7. ; Language:     CL
  8. ; Package:      ZEBU
  9. ; Status:       Experimental (Do Not Distribute) 
  10. ; RCS $Header: $
  11. ;
  12. ; (c) Copyright 1991, Hewlett-Packard Company
  13. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  14. ; Revisions:
  15. ; RCS $Log: $
  16. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  17. (in-package "ZEBU")
  18. (provide "zebu-actions")
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20. ;;                   Functions used in ZEBU grammar actions
  21. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  22.  
  23. (declaim (inline EMPTY EMPTY-SEQ SEQ-CONS EMPTY-SET SET-CONS K-4-3))
  24.  
  25. (defun identity* (&rest x) x)
  26.  
  27. (defun EMPTY-SEQ () ())
  28. (defun SEQ-CONS (a seq) (cons a seq))    
  29.  
  30. (defun EMPTY-SET () ())
  31. (defun SET-CONS (a set) (adjoin a set))
  32.  
  33. (defun EMPTY (&rest rest) (declare (ignore rest)) nil)
  34.  
  35. (defun K-4-3 (ignore dummy1 result dummy2)
  36.   ;; a K (constant) function of 4 arguments that returns the third
  37.   (declare (ignore ignore dummy1 dummy2))
  38.   result)
  39.  
  40. (defun K-2-1 (result dummy)
  41.   ;; a K (constant) function of 2 arguments that returns the first
  42.   (declare (ignore dummy))
  43.   result)
  44.  
  45. (defun K-2-2 (dummy result)
  46.   ;; a K (constant) function of 2 arguments that returns the 2nd
  47.   (declare (ignore dummy))
  48.   result)
  49.  
  50. (defun K-3-2 (dummy1 result dummy2)
  51.   ;; a K (constant) function of 3 arguments that returns the 2nd
  52.   (declare (ignore dummy1 dummy2))
  53.   result)
  54.  
  55. (defun CONS-1-3 (a ignore b)
  56.   (declare (ignore ignore))
  57.   (cons a b))
  58.  
  59. (defun CONS-2-3 (ignore a b)
  60.   (declare (ignore ignore))
  61.   (cons a b))
  62.  
  63. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  64. ;;                        End of zebu-actions.l
  65. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  66.